{extend name='layout:app' /}

{block name='css'}
<link rel="stylesheet" href="__STATIC__/css/help.css">
{/block}

{block name='content'}
    <div id="app">
        <div class="nav">
            <i class="el-icon-arrow-left icon_left" @click="back"></i>
            <div>帮助</div>
            <i class="iconfont icon-home icon_right" @click="home"></i>
        </div>

        <div class="explain">
            <div class="item" @click="infoShow">
                <el-button type="primary">驾校报名返现金200元说明</el-button>
            </div>
            <div class="item" @click="infoShow">
                <el-button type="primary">积分使用方法</el-button>
            </div>
            <!--<div class="item" @click="infoShow">
                <el-button type="primary">抵扣券使用方法</el-button>
            </div>
            <div class="item" @click="infoShow">
                <el-button type="primary">联系客服</el-button>
            </div>-->
            <a href="/index/index/contact.html">
                <div class="item">
                    <el-button type="primary">联系客服</el-button>
                </div>
            </a>
            <a href="/index/index/complain.html">
                <div class="item">
                    <el-button type="primary">投诉</el-button>
                </div>
            </a>
            <el-dialog
                    title="提示"
                    :visible.sync="infoDialog"
                    width="75%"
                    center>
                <span v-html="infoContent"></span>
                <span slot="footer" class="dialog-footer">
                    <el-button @click="infoDialog = false">取 消</el-button>
                    <el-button type="primary" @click="callPhone">确 定</el-button>
                </span>
            </el-dialog>
        </div>
    </div>
{/block}
{block name='js'}
<script>
    var that

    new Vue({
        el:'#app',
        data: {
            phone: '',
            pwd: '',
            infoDialog: false,
            infoContent: ''
        },
        mounted() {
            that = this  //生成vue副本
        },
        methods: {
            back() {
                window.history.go(-1)
            },
            home() {
                location.href = '/'
            },
            infoShow(e) {
                const info = $(e.currentTarget).text()
                if(info === '积分使用方法') {
                    this.infoContent = '满5积分，再加2元，即可寄件一次'
                }
                if(info === '驾校报名返现金200元说明') {
                    this.infoContent = '<p>1.领取驾校报名返现200元奖品。</p><br>' +
                        '<p>2.学员自己确认驾校。</p><br>' +
                        '<p>3.在蜂鸟驿站填写驾校基本信息。</p><br>' +
                        '<p>4.驾校报名成功。</p><br>' +
                        '<p>5.凭报名资料和奖品卷领取现金。</p>'
                }
                this.infoDialog = true
            },
            callPhone() {
                if(this.infoContent.includes('联系热线')) {
                    location.href = 'tel:15351217062'
                }else {
                    this.infoDialog = false
                }
            },
            btnReg() {
                $.post('',{phone:this.phone,pwd:this.pwd},function (res) {

                },'json')
            }
        }
    });


</script>
{/block}